import request from '@/utils/request'

export function getList(page, limit, noticeQuery) {
  return request({
    url: `/dormitory/notice/list/${page}/${limit}`,
    method: 'post',
    data: noticeQuery
  })
}

export function getNotice(id) {
  return request({
    url: `/dormitory/notice/getNotice/${id}`,
    method: 'get'
  })
}

export function save(notice) {
  return request({
    url: `/dormitory/notice/save`,
    method: 'post',
    data: notice
  })
}

export function update(notice) {
  return request({
    url: `/dormitory/notice/update`,
    method: 'post',
    data: notice
  })
}

export function remove(id) {
  return request({
    url: `/dormitory/notice/remove/${id}`,
    method: 'delete'
  })
}

export function buildingList() {
  return request({
    url: `/dormitory/building/buildingList`,
    method: 'get'
  })
}
